var tips = [];
var errorInfo = {};
var phoneRegex = {
    chinesePhone: /^(1[0-9])[0-9]{9}$|(^(\+|00)852[9865])[0-9]{7}$/,
    hwPhone: /^[0-9]{5,10}$/,
    USAPhone: /^[0-9]{10}$/,
    email: /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9\-]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/i,
    anyPhoneAndMail: /^(1[0-9])[0-9]{9}$|^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w+)\s*$/,
    anyPhone: /^[0-9]{5,15}$/
};
var authCodeCountTimes = 0;
function xssFilter(e) {
    if (typeof e == "string") {
        return e.replace(/<script>/g, "&lt;script&gt;").replace(/<\/script>/g, "&lt;/script&gt;")
    } else {
        return e
    }
}
function XSSGuard4URL(e) {
    if (/(?:javascript|jav\s+ascript|\&#\d+|\&#x)/i.test(e)) {
        return ""
    }
    return e
}
if (!window.pendingRequests) {
    window.pendingRequests = {};
    $.ajaxPrefilter(function (e, t, i) {
        var n = e.url;
        if (n.indexOf("?") != -1) {
            n = n + "&" + e.data + "&"
        } else {
            n = n + "?" + e.data + "&"
        }
        var r = ["reflushCode"];
        for (var s = 0; s < r.length; s++) {
            if (n.indexOf(r[s]) != -1) {
                n = n.replace(new RegExp(r[s] + "=.*?&", "gm"), "")
            }
        }
        if (new RegExp("^" + localHttps + "/ajaxHandler/").test(n)) {
            if (!pendingRequests[n]) {
                var a = new Date;
                a.setTime(a.getTime() + 30 * 1e3);
                pendingRequests[n] = {jqXHR: i, _expires: a}
            } else {
                if (pendingRequests[n]._expires.getTime() < (new Date).getTime()) {
                    var a = new Date;
                    a.setTime(a.getTime() + 30 * 1e3);
                    pendingRequests[n] = {jqXHR: i, _expires: a}
                } else {
                    i.abort()
                }
            }
        }
        var o = e.complete;
        e.complete = function (e, t) {
            delete pendingRequests[n];
            if ($.isFunction(o)) {
                o.apply(this, arguments)
            }
        }
    })
}
function gotoUrl(e) {
    location.href = XSSGuard4URL(e)
}
function Trim(e) {
    return e.replace(/(^\s*)|(\s*$)/g, "")
}
function valiRegular(e, t) {
    var i = "";
    switch (e) {
        case"email":
            i = /^\s*([A-Za-z0-9_-]+(\.\w+)*@(\w+\.)+\w+)\s*$/;
            break;
        case"mobile":
            i = /^1\d{10}$/;
            break;
        case"password":
            i = /^\S{6,32}$/;
            break;
        case"mobilecode":
            i = /^\S{4}$/;
            break
    }
    return i.test(t)
}
function getParmPoint(e, t) {
    var i = e.split("#");
    for (var n = 0; n < i.length; n++) {
        var r = i[n].split("=")[0];
        var s = i[n].split("=")[1];
        if (r == t) {
            return s
        }
    }
    return ""
}
function getUrlParam(e, t) {
    var i = new RegExp("(\\?|\\&)" + t + "\\=(.*?)($|\\&)");
    var n = i.exec(e);
    if (n && n.length > 1)return n[2];
    return ""
}
function ajaxJSONP(e, t, i) {
    $.getJSON(e + t + "&reflushCode=" + Math.random() + "&callback=?", i)
}
function ajaxHandler(e, t, i, n, r, s, a) {
    removeAjaxDataAllSpace(t);
    var o = $.ajax({
        url: getWebUrlHttps() + e + "?reflushCode=" + Math.random(),
        type: "POST",
        data: t,
        beforeSend: function (e) {
            e.setRequestHeader("Page-Token", "undefined" == typeof pageToken ? "" : pageToken)
        },
        success: function (e) {
            $(".send-ajax").removeClass("send-ajax");
            if ($("#logoutUrl").attr("href") && e.errorCode == "10000302") {
                window.location.href = XSSGuard4URL($("#logoutUrl").attr("href"));
                return
            }
            var t = $(".global_dialog_confirm_main");
            if (e.errorCode == "10000004") {
                t.hide();
                var n = {
                    title: rss_new.uc_common_hint,
                    btnLeft: false,
                    btnRight: {
                        text: rss_new.box_js_confirm || "OK", fn: function () {
                            this.hide();
                            window.location.reload();
                            t.show()
                        }
                    },
                    html: "<p>" + rss_new.uc_login_overdue + "</p>"
                };
                if (a) {
                    $.extend(n, a)
                }
                $("<div>").Dialog(n).Dialog("show")
            }
            if (e.errorCode == "70001105") {
                t.hide();
                $(".send-ajax").removeClass("send-ajax");
                $("<div>").Dialog({
                    title: rss_new.uc_common_hint,
                    btnLeft: false,
                    btnRight: {
                        text: rss_new.box_js_confirm || "OK", fn: function () {
                            this.hide();
                            t.show()
                        }
                    },
                    html: "<p>" + rss_new.uc_error_10000001 + "</p>"
                }).Dialog("show")
            }
            i(e)
        },
        error: n,
        cache: false,
        dataType: s,
        async: r
    });
    return o
}
function setCookie(e, t) {
    var i = setCookie.arguments;
    var n = setCookie.arguments.length;
    var r = n > 2 ? i[2] : null;
    if (r != null) {
        var s = new Date;
        s.setTime(s.getTime() + r * 1e3 * 3600 * 24)
    }
    document.cookie = e + "=" + escape(t) + (r == null ? "" : "; expires=" + s.toGMTString()) + "; path=" + "/"
}
function getCookie(e) {
    var t = e + "=";
    if (document.cookie.length > 0) {
        offset = document.cookie.indexOf(t);
        if (offset != -1) {
            offset += t.length;
            end = document.cookie.indexOf(";", offset);
            if (end == -1) end = document.cookie.length;
            return unescape(document.cookie.substring(offset, end))
        } else return ""
    }
}
function delCookie(e) {
    var t = new Date;
    t.setTime(t.getTime() - 86400 * 1e3 * 1);
    setCookie(e, "", t)
}
function getParm(e, t) {
    var i = e.replace("?", "");
    var n = i.split("&");
    for (var r = 0; r < n.length; r++) {
        var s = n[r].split("=")[0];
        var a = n[r].split("=")[1];
        if (s == t) {
            return a
        }
    }
    return ""
}
function isWeakPassword(e, t) {
    var i = "isWeakPassword";
    var n = {password: e};
    ajaxHandler(i, n, function (e) {
        if (e) {
            t(e)
        }
    }, function () {
    }, true, "json")
}
function chkPwdComplexity(e) {
    if (e.length < 8) {
        return 0
    }
    var t = 0;
    if (e.length >= 8 && e.length <= 32) {
        t = 1
    }
    if (e.match(/([0-9])+/)) {
        t = 1
    }
    if (e.match(/([A-Z])+/) && e.match(/([a-z])+/)) {
        t = 1
    }
    if (e.match(/([0-9])+/) && e.match(/([A-Z])+/) && e.match(/([a-z])+/) && e.length >= 8 && e.length <= 32) {
        t = 2;
        if (getRepet(e) > 3) {
            t = 3
        }
    }
    return t
}
function getPwdComplexity(e) {
    var t = {
        strong: 0,
        upLowChar: false,
        length: false,
        number: false,
        lengthLt8: false,
        lengthGt32: false,
        missingUppercase: false,
        missingLowercase: false,
        OnlyNumberOrLetter: false
    };
    if (e.length >= 8 && e.length <= 32) {
        t.length = true
    }
    if (e.match(/([0-9])+/)) {
        t.number = true
    }
    if (e.match(/([A-Z])+/) && e.match(/([a-z])+/)) {
        t.upLowChar = true
    }
    if (e.length < 8) {
        t.lengthLt8 = true
    }
    if (e.length > 32) {
        t.lengthGt32 = true
    }
    if (!e.match(/([A-Z])+/)) {
        t.missingUppercase = true
    }
    if (!e.match(/([a-z])+/)) {
        t.missingLowercase = true
    }
    if (e.match(/([0-9])+/) && !e.match(/([a-zA-Z])+/) || !e.match(/([0-9])+/) && e.match(/([a-zA-Z])+/)) {
        t.OnlyNumberOrLetter = true
    }
    t.strong = chkPwdComplexity(e);
    return t
}
function getRepet(e) {
    e = e + "";
    var t, i = e.length, n = 0, r = {};
    for (t = 0; t < i; t++) {
        r[e.charAt(t)] = 1
    }
    for (t in r) {
        if (r.hasOwnProperty(t)) {
            n++
        }
    }
    return n
}
function onPwdKeyUp(e) {
    var t = getPwdComplexity(e.value);
    var i = $("#pwdStong");
    if (t.length && t.upLowChar && t.number) {
        isWeakPassword(e.value, function (e) {
            if (e.isSuccess == 1) {
                i.addClass("pwd-strong-div").removeClass("pwd-low-div").removeClass("pwd-middle-div");
                $("#msg_password").html("");
                $("#pwdDiv").removeClass("input-error-EMUI5");
                $("#pwdComplexFlag").text(rss_new.common_strong)
            } else if (e.errorCode == "10000801") {
                i.addClass("pwd-low-div").removeClass("pwd-middle-div").removeClass("pwd-strong-div");
                $("#msg_password").text(rss_new.uc_error_70008001);
                $("#pwdComplexFlag").text(rss_new.common_weak);
                $("#pwdDiv").addClass("input-error-EMUI5")
            }
        })
    } else {
        i.removeClass("pwd-middle-div").removeClass("pwd-low-div").removeClass("pwd-strong-div");
        $("#msg_password").html("");
        $("#pwdComplexFlag").html("");
        $("#pwdDiv").removeClass("input-error-EMUI5")
    }
    n($("#pwdLength"), t.length);
    n($("#pwdChar"), t.upLowChar);
    n($("#pwdNumber"), t.number);
    function n(e, t) {
        if (t) {
            e.find("img").attr("src", XSSGuard4URL(localInfo.formatOk));
            e.removeClass("gay-tips-EMUI5").addClass("success-tips-EMUI5")
        } else {
            e.find("img").attr("src", XSSGuard4URL(localInfo.formatNo));
            e.removeClass("success-tips-EMUI5").addClass("gay-tips-EMUI5")
        }
    }

    if (t.strong * 1 < 2) {
        $("#resetPwdBtn").addClass("disabled")
    } else {
        $("#resetPwdBtn").removeClass("disabled")
    }
}
function onPwdKeyUp2(e) {
    onPwdKeyUp(e);
    var t = getPwdComplexity(e.value);
    i($("#pwdLength"), t.length);
    i($("#pwdChar"), t.upLowChar);
    i($("#pwdNumber"), t.number);
    function i(e, t) {
        if (t) {
            e.find("img").attr("src", XSSGuard4URL(localInfo.formatOk));
            e.removeClass("gay-tips").addClass("success-tips")
        } else {
            e.find("img").attr("src", XSSGuard4URL(localInfo.formatNo));
            e.removeClass("success-tips").addClass("gay-tips")
        }
    }
}
function getUrlParm(e) {
    var t = document.location.search, i = !t ? [] : t.split("&"), n = {};
    for (var r = 0, s = i.length; r < s; r++) {
        var a = i[r].split("=");
        var o = a[0];
        if (r == 0) {
            o = o.split("?")[1]
        }
        if (e == o)return a[1]
    }
    return ""
}
var localSites = {localUrl: location.href.split("?")[0]};
function isIe() {
    return "ActiveXObject" in window
}
function isPWDComplex(e) {
    if ("" == e || e.length < 8 || e.length > 32) {
        return false
    }
    var t = /[0-9]+/;
    var i = /[A-Z]+/;
    var n = /[a-z]+/;
    var r = t.test(e) && i.test(e) && n.test(e);
    return r
}
function chgRandomCode(e, t) {
    if (typeof e != "undefined") {
        e.src = t + "&_t=" + (new Date).getTime()
    }
}
function jsInnerTimeout(e, t, i, n) {
    e.attr("disabled", true);
    e.addClass("auth_code_grey");
    var r = parseInt(e.attr("IntervalTime"));
    if (!i) {
        $(".ddrop-EMU5").addClass("ddrop-disabled");
        $(".input-error-EMUI5").removeClass("input-error-EMUI5");
        $(".error-tips-EMUI5").html("")
    }
    r--;
    e.attr("disabled", true);
    if (r <= -1) {
        e.removeAttr("disabled");
        e.removeClass("disabled");
        e.removeClass("auth_code_grey");
        $(".ddrop-EMU5").removeClass("ddrop-disabled");
        if (e.attr("type") && e.attr("type").toLowerCase() == "button") {
            e.val(t)
        } else {
            e.find("span:first,a:first").text(t)
        }
        e.attr("IntervalTime", 60);
        return true
    }
    if (e.attr("type") && e.attr("type").toLowerCase() == "button") {
        e.val(rss_new.uc_common_resend_time.format(r))
    } else {
        e.find("span:first,a:first").text(rss_new.uc_common_resend_time.format(r))
    }
    e.attr("IntervalTime", r);
    if (n) {
        setTimeout(function () {
            e.addClass("auth_code_grey");
            jsInnerTimeout(e, t, true, true)
        }, 1e3)
    } else {
        authCodeCountTimes = setTimeout(function () {
            e.addClass("auth_code_grey");
            jsInnerTimeout(e, t, true)
        }, 1e3)
    }
}
$(function () {
    switch (currentSiteID) {
        case"9":
            (function (e, t, i, n, r) {
                e[n] = e[n] || [];
                e[n].push({"gtm.start": (new Date).getTime(), event: "gtm.js"});
                var s = t.getElementsByTagName(i)[0], a = t.createElement(i), o = n != "dataLayer" ? "&l=" + n : "";
                a.async = true;
                a.src = "//www.googletagmanager.com/gtm.js?id=" + r + o;
                s.parentNode.insertBefore(xssFilter(a), xssFilter(s))
            })(window, document, "script", "dataLayer", "GTM-KM5CKL");
            break
    }
});
function isMobile() {
    var e = navigator.userAgent;
    var t = ["Android", "iPhone", "SymbianOS", "Mobile", "Windows Phone", "iPad", "iPod"];
    var i = false;
    for (var n = 0; n < t.length; n++) {
        if (e.indexOf(t[n]) > 0) {
            i = true;
            break
        }
    }
    return i
}
String.prototype.format = function () {
    if (arguments.length == 0)return this;
    for (var e = this, t = 0; t < arguments.length; t++)e = e.replace(new RegExp("\\{" + t + "\\}", "g"), arguments[t]);
    return e
};
function getExpressPhone(e) {
    if (!e || e == "") {
        return ""
    }
    if (e.indexOf("@") >= 0) {
        return e
    }
    e = e.trim();
    var t = new RegExp("^(0086)(\\d{3,7}.{0,4}\\d{4})$");
    var i = new Array("297", "975", "387", "238", "240", "245", "691", "680", "250", "684", "86", "81", "91", "61", "852", "65", "60", "64", "507", "62", "92", "673", "66", "44", "33", "971", "966", "84", "94", "972", "30", "41", "46", "48", "49", "31", "32", "7", "353", "39", "45", "234", "263", "358", "265", "249", "357", "47", "43", "34", "380", "992", "351", "90", "98", "995", "375", "375", "961", "373", "359", "258", "244", "254", "242", "260", "968", "327", "372", "421", "36", "965", "352", "355", "370", "231", "501", "1268", "378", "40", "212", "213", "354", "1", "356", "220", "268", "261", "27", "973", "994", "20", "509", "591", "57", "256", "593", "52", "51", "504", "232", "223", "505", "977", "977", "1809", "233", "233", "502", "54", "58", "56", "93", "506", "55", "1246", "503", "1876", "595", "597", "592", "237", "675", "598", "962", "963", "386", "226", "224", "257", "248", "993", "241", "95", "974", "264", "235", "267", "230", "423", "252", "251", "221", "216", "967", "350", "376", "228", "853", "253", "266", "855", "976", "679", "960", "689", "53", "676", "239", "682", "1264", "7", "375", "995", "595", "267", "260", "230", "256", "233", "856", "967", "243", "234", "255", "998");
    if (t.test(e)) {
        e = e.substring(4, 15)
    } else {
        var n = false;
        var r;
        for (var s = 0; s < i.length; s++) {
            var a = new RegExp("^(00" + i[s] + ")(\\d*).*(\\d+)$");
            if (a.test(e)) {
                n = true;
                if (r == null) {
                    r = i[s]
                } else {
                    if (r.length < i[s].length) {
                        r = i[s]
                    }
                }
            }
        }
        if (n) {
            var o = e.substring(2 + r.length, e.length);
            e = "+" + r + " " + o
        }
    }
    return e
}
function htmlencode(e) {
    var t = document.createElement("div");
    t.appendChild(document.createTextNode(e));
    return t.innerHTML
}
function htmldecode(e) {
    var t = document.createElement("div");
    t.innerHTML = e;
    return t.innerText || t.textContent
}
function getAccountType(e) {
    if (!e || e == "") {
        return
    }
    var t = new RegExp("^([0-9]|(\\+))\\d+(\\*)*\\d+$");
    if (e.indexOf("@") > -1) {
        return 1
    } else if (t.test(e)) {
        return 2
    } else {
        return 0
    }
}
function showErrorToBeSeen(e, t, i) {
    e.parent().css("border", "1px solid #f90404");
    showError(t, i)
}
function gid(e) {
    return document.getElementById(e)
}
function turnErrorToNormal(e) {
    e.parent().css("border", "1px solid #c5c5c5")
}
function showError(e, t, i, n, r) {
    t = xssFilter(t);
    if (typeof CLOUD != "undefined") {
        e.html('<div class="secpwd-error-tip" style="display: block;"><div class="cloudPagePop">' + t + '</div><div class="panel-arrow-bottoms"><div class="panel-arrow-bodys"></div></div></div>')
    } else if (typeof IFCLOUD != "undefined") {
        e.html('<div class="cloud-tip-container"><div class="tip-top"></div><div class="cloud-tip-msg-container"><div class="tip-contont div-table">' + '<div class="div-tr"><div class="error-ico div-td"></div><div class="msg div-td">' + t + "</div></div></div></div></div>")
    } else {
        if (i && i == "left" && n && r) {
            e.html("<div class='relative'><div class='pop'><b class='uptick_left'></b><div class='poptips_left'><table class='popMsg cas_error'><tr><td><b class='poptips-no'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips_left").attr("style", "margin-left:" + n + "px;margin-right:" + r + "px;")
        } else if (i && i == "right" && n && r) {
            e.html("<div class='relative'><div class='pop'><b class='uptick'></b><div class='poptips'><table class='popMsg cas_error'><tr><td><b class='poptips-no'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips").attr("style", "margin-left:" + n + "px;margin-right:" + r + "px;")
        } else if (i && i == "left" && n) {
            e.html("<div class='relative'><div class='pop'><b class='uptick_left'></b><div class='poptips_left'><table class='popMsg cas_error'><tr><td><b class='poptips-no'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips_left").attr("style", "margin-left:" + n + "px;")
        } else if (i && i == "right" && n) {
            e.html("<div class='relative'><div class='pop'><b class='uptick'></b><div class='poptips'><table class='popMsg cas_error'><tr><td><b class='poptips-no'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips").attr("style", "margin-left:" + n + "px;")
        } else if (i && i == "left") {
            e.html("<div class='relative'><div class='pop'><b class='uptick_left'></b><div class='poptips_left'><table class='popMsg cas_error'><tr><td><b class='poptips-no'></b></td><td>" + t + "</td></tr></table></div></div></div>")
        } else {
            e.html("<div class='relative'><div class='pop'><b class='uptick'></b><div class='poptips'><table class='popMsg cas_error'><tr><td><b class='poptips-no'></b></td><td>" + t + "</td></tr></table></div></div></div>")
        }
        autoHide(e)
    }
}
$(document).click(function () {
    $.each(tips, function () {
        this.html("")
    });
    tips = []
});
function showSuccess(e, t, i, n, r) {
    t = xssFilter(t);
    if (typeof CLOUD != "undefined") {
        e.html('<div class="secpwd-error-tip" style="display: block;"><div class="cloudPagePop">' + t + '</div><div class="panel-arrow-bottoms"><div class="panel-arrow-bodys"></div></div></div>');
        autoHide(e)
    } else {
        if (i && i == "left" && n && r) {
            e.html("<div class='relative'><div class='pop'><b class='uptick_left'></b><div class='poptips_left'><table class='popMsg cas_ok'><tr><td><b class='poptips-yes'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips_left").attr("style", "margin-left:" + n + "px;margin-right:" + r + "px;")
        } else if (i && i == "right" && n && r) {
            e.html("<div class='relative'><div class='pop'><b class='uptick'></b><div class='poptips'><table class='popMsg cas_ok'><tr><td><b class='poptips-yes'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips").attr("style", "margin-left:" + n + "px;margin-right:" + r + "px;")
        } else if (i && i == "left" && n) {
            e.html("<div class='relative'><div class='pop'><b class='uptick_left'></b><div class='poptips_left'><table class='popMsg cas_ok'><tr><td><b class='poptips-yes'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips_left").attr("style", "margin-left:" + n + "px;")
        } else if (i && i == "right" && n) {
            e.html("<div class='relative'><div class='pop'><b class='uptick'></b><div class='poptips'><table class='popMsg cas_ok'><tr><td><b class='poptips-yes'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips").attr("style", "margin-left:" + n + "px;")
        } else if (i && i == "left") {
            e.html("<div class='relative'><div class='pop'><b class='uptick_left'></b><div class='poptips_left'><table class='popMsg cas_ok'><tr><td><b class='poptips-yes'></b></td><td>" + t + "</td></tr></table></div></div></div>")
        } else {
            e.html("<div class='relative'><div class='pop'><b class='uptick'></b><div class='poptips'><table class='popMsg cas_ok'><tr><td><b class='poptips-yes'></b></td><td>" + t + "</td></tr></table></div></div></div>")
        }
        autoHide(e)
    }
}
var showMsgSuccess = function () {
    function e(e) {
        var i = 236;
        var n = {leftPix: "0px", rightPix: "0px", bottom: "20px", contentType: "text", autoHide: true};
        e = $.extend(n, e);
        var r = e.obj;
        var s = e.lang || localInfo.lang || lang;
        var a = e.leftPix;
        var o = e.rightPix;
        var l = "font-size:14px;line-height:1.5;";
        var d = e.bottom;
        if (e.contentType == "text") {
            var c = g(e.msg, l);
            var f;
            var u;
            var c;
            if (c > i) {
                f = i;
                l += "width:" + f + "px"
            } else {
                f = c
            }
            u = f + 50 + "px";
            f += "px";
            var p = m(e.msg, l);
            p += "px"
        } else {
            var v = w(e.msg);
            p = v.height + "px";
            f = v.width + "px";
            u = v.width + 50 + "px"
        }
        var h = '<div class="success-tip-content"><div class="success-tip">' + '<div class="tip-left-top"></div>' + '<div class="tip-right-top"></div>' + '<div class="tip-top"></div>' + '<div class="tip-left"></div>' + '<div class="tip-right"></div>' + '<div class="tip-center"></div>' + '<div class="tip-left-bottom"></div>' + '<div class="tip-right-bottom"></div>' + '<div class="tip-bottom"></div></div></div>';
        r.html(h);
        if (s == "ar-eg" || s == "iw-il" || s == "fa-ir" || s == "ur-pk") {
            r.find(".success-tip-content .success-tip").attr("style", "right:" + o + ";bottom:" + d + ";width:" + u + ";")
        } else {
            r.find(".success-tip-content .success-tip").attr("style", "left:" + a + ";bottom:" + d + ";width:" + u + ";");
            if (e.contentType == "text") {
                e.msg = t(e.msg)
            }
        }
        e.msg = xssFilter(e.msg);
        r.find(".success-tip-content .success-tip .tip-top").attr("style", "width:" + f + ";");
        r.find(".success-tip-content .success-tip .tip-left").attr("style", "height:" + p + ";");
        r.find(".success-tip-content .success-tip .tip-right").attr("style", "height:" + p + ";");
        r.find(".success-tip-content .success-tip .tip-center").attr("style", "width:" + f + ";height:" + p + ";padding-right:5px;").html(e.msg);
        r.find(".success-tip-content .success-tip .tip-bottom").attr("style", "width:" + f + ";");
        if (e.autoHide) {
            autoHide(r)
        }
        function g(e, t) {
            e = xssFilter(e);
            var i = "count" + (new Date).getTime();
            t += ";visibility:hidden;word-wrap:break-word;word-break:break-all;";
            var n = "<span id='" + i + "'>" + e + "</span>";
            $("body").append(n);
            $("body").find("#" + i).attr("style", t);
            var r = $("#" + i)[0].offsetWidth;
            $("#" + i).remove();
            return r
        }

        function m(e, t) {
            e = xssFilter(e);
            var i = "count" + (new Date).getTime();
            t += ";visibility:hidden;word-wrap:break-word;word-break:break-all;font-family:" + $("body").css("font-family");
            var n = "<div id='" + i + "'>" + e + "</div>";
            $("body").append(n);
            $("body").find("#" + i).attr("style", t);
            var r = $("#" + i)[0].offsetHeight;
            $("#" + i).remove();
            return r
        }

        function w(e) {
            e = xssFilter(e);
            var t = "count" + (new Date).getTime();
            var i = "<div id='" + t + "'>" + e + "</div>";
            $("body").append(i);
            $("body").find("#" + t).attr("style", "position:absolute;font:" + r.css("font") + ";");
            var n = $("#" + t)[0].offsetHeight;
            var s = $("#" + t)[0].offsetWidth;
            $("#" + t).remove();
            return {height: n, width: s}
        }
    }

    function t(e) {
        e = xssFilter(e);
        var t = "count" + (new Date).getTime();
        var i = "<div id='" + t + "'>" + e + "</div>";
        $("body").append(i);
        var n = $("#" + t).text();
        $("#" + t).remove();
        return n
    }

    return e
}();
function showWarning(e, t, i, n, r) {
    t = xssFilter(t);
    if (typeof CLOUD != "undefined") {
        e.html('<div class="secpwd-error-tip" style="display: block;"><div class="cloudPagePop">' + t + '</div><div class="panel-arrow-bottoms"><div class="panel-arrow-bodys"></div></div></div>');
        autoHide(e)
    } else {
        if (i && i == "left" && n && r) {
            e.html("<div class='relative'><div class='pop'><b class='uptick_left'></b><div class='poptips_left'><table class='popMsg cas_warn'><tr><td><b class='poptips-warn'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips_left").attr("style", "margin-left:" + n + "px;margin-right:" + r + "px;")
        } else if (i && i == "right" && n && r) {
            e.html("<div class='relative'><div class='pop'><b class='uptick'></b><div class='poptips'><table class='popMsg cas_warn'><tr><td><b class='poptips-warn'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips").attr("style", "margin-left:" + n + "px;margin-right:" + r + "px;")
        } else if (i && i == "left" && n) {
            e.html("<div class='relative'><div class='pop'><b class='uptick_left'></b><div class='poptips_left'><table class='popMsg cas_warn'><tr><td><b class='poptips-warn'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips_left").attr("style", "margin-left:" + n + "px;")
        } else if (i && i == "right" && n) {
            e.html("<div class='relative'><div class='pop'><b class='uptick'></b><div class='poptips'><table class='popMsg cas_warn'><tr><td><b class='poptips-warn'></b></td><td>" + t + "</td></tr></table></div></div></div>");
            e.find(".poptips").attr("style", "margin-left:" + n + "px;")
        } else if (i && i == "left") {
            e.html("<div class='relative'><div class='pop'><b class='uptick_left'></b><div class='poptips_left'><table class='popMsg cas_warn'><tr><td><b class='poptips-warn'></b></td><td>" + t + "</td></tr></table></div></div></div>")
        } else {
            e.html("<div class='relative'><div class='pop'><b class='uptick'></b><div class='poptips'><table class='popMsg cas_warn'><tr><td><b class='poptips-warn'></b></td><td>" + t + "</td></tr></table></div></div></div>")
        }
        autoHide(e)
    }
}
function checkAdMarketAgreedAgrContent(e) {
    if (e == undefined) {
        return e
    }
    e = e.replace(/\'/g, '"');
    var t = $.parseJSON(e);
    var i = new Array;
    for (var n = 0; n < t.length; n++) {
        if (t[n].id != 10) {
            i.push(t[n])
        } else {
            t[n].ver = "ignore";
            i.push(t[n])
        }
    }
    return JSON.stringify(i)
}
function loadDefaultPic(e) {
    e.src = localInfo.defaultPic
}
window.getHeight = function () {
    if (window.innerHeight != undefined) {
        return window.innerHeight
    } else {
        var e = document.body, t = document.documentElement;
        return Math.min(t.clientHeight, e.clientHeight)
    }
};
window.getWidth = function () {
    if (typeof window.innerWidth != "undefined") {
        return window.innerWidth
    } else {
        return Math.min(document.body.clientWidth, document.documentElement.clientWidth)
    }
};
String.prototype.trim = function () {
    if (this == "") {
        return this
    }
    return this.replace(/^\s*|\s*$/g, "")
};
function initEMUI5WapLayout() {
    var e = function () {
        return function () {
            var e = document.getElementById("head");
            var t = document.getElementById("headContent");
            var i = document.body.clientWidth;
            var n = i * 9 / 21;
            e.style["min-height"] = n + "px";
            t.style["padding-top"] = n * .27 + "px";
            t.style["padding-bottom"] = "8px";
            var r = document.body.clientHeight;
            var s = document.documentElement.clientHeight;
            var a = document.documentElement.clientWidth;
            if (r + 48 > s) {
                $("body").css("position", "relative");
                $(".footBtn-div").css("position", "relative");
                window.scrollTo(0, 35)
            } else {
                $("body").css("position", "static");
                $(".footBtn-div").css("position", "absolute")
            }
        }
    }();
    e();
    var t = "resize";
    window.addEventListener(t, function () {
        setTimeout(function () {
            e()
        }, 100)
    }, false)
}
function initEMUI5WapLayout_3_2() {
    var e = function () {
        return function () {
            var e = document.getElementById("head");
            var t = document.body.clientWidth;
            var i = t * 2 / 3;
            e.style.height = i + "px";
            var n = document.body.clientHeight;
            var r = document.documentElement.clientHeight;
            var s = document.documentElement.clientWidth;
            if (n > r || s > r) {
                $("body").css("position", "relative")
            } else {
                $("body").css("position", "static")
            }
        }
    }();
    e();
    var t = "resize";
    window.addEventListener(t, function () {
        setTimeout(function () {
            e()
        }, 100)
    }, false)
}
function getNoAuthCodeLinkDiv(e, t) {
    if (!localInfo) {
        return ""
    }
    if (localInfo.isOpenApealSelf != "true") {
        return ""
    }
    var i;
    if (e) {
        i = '<div class="representation_div center" style="' + e + '">'
    } else {
        i = '<div class="representation_div center">'
    }
    if (t) {
        i = i + '<a class="representation_link" href="' + localInfo.representationLink + "&extInfo=" + localInfo.extInfo + '">' + rss_new.representation_not_receive_verification_code + "</a></div>"
    } else {
        i = i + '<a target="_blank"  class="representation_link a-EMUI5" href="' + localInfo.representationLink + "&extInfo=" + localInfo.extInfo + '">' + rss_new.representation_not_receive_verification_code + "</a></div>"
    }
    return i
}
function htmlDecodeJQ(e) {
    if (typeof e == "string") {
        var t = document.createElement("div");
        t.innerHTML = e;
        return t.innerText || t.textContent
    } else {
        return e
    }
}
function wapToast(e, t) {
    var i = "toast" + (new Date).getTime();
    var n = "<div class='toastWrap'><div  id='" + i + "'   class='toast vertical-center'>" + e + "</div></div>";
    var r = $(n);
    var s = t ? t : $("body");
    s.append(r);
    if (r.height() > 32) {
        r.addClass("text-left")
    }
    setTimeout(function () {
        r.remove()
    }, 2e3)
}
$(document).on("keyup", ".input-number", function () {
    var e = /[^0-9\+]/g;
    var t = this.value;
    if (e.test(this.value)) {
        t = this.value = this.value.replace(e, "")
    }
    t = t.replace(/\+/g, "");
    if (/^\+/.test(this.value)) {
        t = "+" + t
    }
    this.value = t
});
$(document).on("paste", ".inuput-number", function () {
    var e = /\D/g;
    if (e.test(this.value)) {
        this.value = this.value.replace(e, "")
    }
});
function autoHide(e) {
    var t = e.attr("tiptimer");
    if (!t) {
        t = "tiptimer" + (new Date).getTime();
        e.attr("tiptimer", t)
    }
    if (errorInfo[t]) {
        window.clearTimeout(errorInfo[t])
    }
    errorInfo[t] = window.setTimeout(function () {
        errorInfo[t] = null;
        e.html("")
    }, 3e3)
}
function countLength(e, t) {
    if (e) {
        e = xssFilter(e.trim())
    }
    var i = "count" + (new Date).getTime();
    var n = "visibility:hidden;word-wrap:break-word;word-break:break-all;font-size:" + t;
    var r = "<span id='" + i + "'>" + e + "</span>";
    $("body").append(r);
    $("body").find("#" + i).attr("style", n);
    var s = $("#" + i)[0].offsetWidth;
    $("#" + i).remove();
    return s
}
function addCssActive(e, t, i) {
    i = i || "disabled";
    e.bind("touchstart", function (e) {
        var n = $(this);
        if (n.hasClass(i))return;
        n.addClass(t)
    });
    e.bind("touchend", function () {
        $(this).removeClass(t)
    });
    $(document).bind("touchend", function () {
        e.removeClass(t)
    })
}
function addItemActive(e, t, i) {
    i = i || "disabled";
    e.bind("touchstart", function (e) {
        var n = $(this);
        if (n.hasClass(i))return;
        var r = n.prev();
        var s = n.next();
        if (r.hasClass("uc-line")) {
            r.hide()
        }
        if (s.hasClass("uc-line")) {
            s.hide()
        }
        n.addClass(t)
    });
    e.bind("touchend", function () {
        var e = $(this);
        var i = e.prev();
        var n = e.next();
        if (i.hasClass("uc-line")) {
            i.show()
        }
        if (n.hasClass("uc-line")) {
            n.show()
        }
        $(this).removeClass(t)
    });
    $(document).bind("touchend", function () {
        e.removeClass(t);
        e.each(function () {
            var e = $(this);
            var t = e.prev();
            var i = e.next();
            if (t.hasClass("uc-line")) {
                t.show()
            }
            if (i.hasClass("uc-line")) {
                i.show()
            }
        })
    })
}
function showSystemError(e, t, i) {
    $("<div></div>").DialogSimple({
        text: e, btnText: t, btnFn: function () {
            this.hide();
            if (typeof i == "function") {
                i()
            }
        }
    }).show()
}
function isRightLang(e) {
    e = e || localInfo.lang;
    if (e == "ar-eg" || e == "iw-il" || e == "fa-ir" || e == "ur-pk")return true;
    return false
}
function showTipDialog(e, t, i, n) {
    $("<div>").DialogSimple({
        btnFn: function () {
            this.hide();
            if (typeof n == "function") {
                n()
            }
        },
        btnText: t,
        text: '<div class="center" style="margin-bottom:10px">' + '<img  src="' + localInfo.successImgPath + '">' + '<p class="inptips2">' + i + "</p>" + "</div>"
    }).show()
}
function showErrorMsg2Btn(e, t, i, n, r) {
    $("<div/>").Dialog({
        title: e, titleUnderline: false, btnRight: {
            text: i, fn: function () {
                this.hide();
                if (typeof r == "function") {
                    r()
                }
            }
        }, btnLeft: {text: t}, html: '<div class="lineHeight150">' + n + "</div>"
    }).Dialog("show")
}
function showSTdialog(e, t) {
    var i = '<div class="lineHeight150">' + rss_new.st_logout_explain + "</div>" + '<div class="lineHeight150">' + rss_new.st_relogin_tips + "</div>";
    var n = {
        title: rss_new.st_logout_title, html: i, btnLeft: {
            text: rss_new.st_logout, fn: function () {
                this.hide();
                e = 0;
                if (t) {
                    t(e)
                }
            }
        }, btnRight: {
            text: rss_new.st_not_logout, fn: function () {
                this.hide();
                e = 1;
                if (t) {
                    t(e)
                }
            }
        }, cancelFn: {
            fn: function () {
                this.hide()
            }
        }, beforeAction: function () {
        }
    };
    $("<div>").Dialog(n).Dialog("show")
}
function chkSecurityRiskFn(e) {
    if (localInfo.needCompleteThirdInfo == "true")return;
    var t = {
        showRiskError: function (e) {
            if (e == "70008800") {
                showSystemError(rss_new.error_risk_70008800, rss_new.box_js_confirm)
            } else {
                showSystemError(rss_new.uc_error_10000001, rss_new.box_js_confirm)
            }
        },
        accountType: localInfo.accountType,
        userAccount: localInfo.userAccount,
        reqClientType: localInfo.reqClientType
    };
    e = $.extend(t, e);
    var i = {
        accountType: e.accountType,
        userAccount: e.userAccount,
        sceneID: e.sceneID,
        reqClientType: e.reqClientType
    };
    var n = "chkSecurityRiskBySession";
    if (e.noLogin) {
        n = "chkSecurityRisk"
    }
    ajaxHandler(n, i, function (t) {
        if ("1" == t.isSuccess) {
            e.callback(t)
        } else {
            e.showRiskError(t.errorCode)
        }
    }, function (e) {
    }, true, "JSON")
}
function get4FactorsListFn(e, t, i) {
    var n = {sceneID: e};
    var r = "get4FactorsListBySession";
    if (i) {
        r = "get4FactorsList"
    }
    ajaxHandler(r, n, function (e) {
        if ("1" == e.isSuccess) {
            t(e)
        } else {
        }
    }, function (e) {
    }, true, "JSON")
}
function initAccountList(e) {
    try {
        var t = $.parseJSON(e);
        var i = [];
        $.each(t.authCodeSentList, function (e, t) {
            if (t.accountType == 1 || t.accountType == 2 || t.accountType == 5 || t.accountType == 6) {
                i.push({userAccount: t.name, accountType: t.accountType})
            }
        });
        i.sort2(function (e, t) {
            return t.accountType > e.accountType
        });
        return i
    } catch (e) {
        return null
    }
}
Array.prototype.sort2 = function (e) {
    var t, i, n = this.length;
    for (t = 0; t < n - 1; t++) {
        for (i = t + 1; i < n; i++) {
            if (!e(this[i], this[t])) {
                temp = this[t];
                this[t] = this[i];
                this[i] = temp
            }
        }
    }
};
var myFormData = function () {
    if (/msie\s+(7|8|9)/.test(navigator.userAgent.toLowerCase()))return null;
    var e = function () {
        var e = ~navigator.userAgent.indexOf("Android") && ~navigator.vendor.indexOf("Google") && !~navigator.userAgent.indexOf("Chrome");
        return e && navigator.userAgent.match(/AppleWebKit\/(\d+)/).pop() <= 534
    }(), t = !!function () {
        try {
            return new Blob
        } catch (e) {
        }
    }(), i = t ? window.Blob : function (e, t) {
        var i = new (window.BlobBuilder || window.WebKitBlobBuilder || window.MSBlobBuilder);
        e.forEach(function (e) {
            i.append(xssFilter(e))
        });
        return i.getBlob(t ? t.type : undefined)
    }, n = function () {
        return e ? r : FormData
    }();

    function r() {
        var e = this, t = [], n = Array(5).join("-") + (+new Date * (1e16 * Math.random())).toString(32),
            r = XMLHttpRequest.prototype.send;
        this.append = function (e, i, r) {
            t.push("--" + n + '\r\nContent-Disposition: form-data; name="' + e + '"');
            if (i instanceof Blob) {
                t.push('; filename="' + (r || "blob") + '"\r\nContent-Type: ' + i.type + "\r\n\r\n");
                t.push(i)
            } else {
                t.push("\r\n\r\n" + i)
            }
            t.push("\r\n")
        };
        XMLHttpRequest.prototype.send = function (s) {
            var a, o, l = this;
            if (s === e) {
                t.push("--" + n + "--\r\n");
                o = new i(t);
                a = new FileReader;
                a.onload = function () {
                    r.call(l, a.result)
                };
                a.onerror = function (e) {
                    throw e
                };
                a.readAsArrayBuffer(o);
                this.setRequestHeader("Content-Type", "multipart/form-data; boundary=" + n);
                XMLHttpRequest.prototype.send = r
            } else {
                r.call(this, s)
            }
        }
    }

    return n
}();
function dataURLtoBlob(e) {
    var t = e.split(",");
    t[1] = t[1].replace(/\s/g, "");
    var i = atob(t[1]);
    var n = [];
    for (var r = 0; r < i.length; r++) {
        n.push(i.charCodeAt(r))
    }
    return new newBlob(new Uint8Array(n), "image/jpeg")
}
function newBlob(e, t) {
    var i;
    try {
        i = new Blob([e], {type: t})
    } catch (r) {
        window.BlobBuilder = window.BlobBuilder || window.WebKitBlobBuilder || window.MozBlobBuilder || window.MSBlobBuilder;
        if (r.name == "TypeError" && window.BlobBuilder) {
            var n = new BlobBuilder;
            n.append(xssFilter(e.buffer));
            i = n.getBlob(t)
        } else if (r.name == "InvalidStateError") {
            i = new Blob([e], {type: t})
        } else {
        }
    }
    return i
}
String.prototype.removeAllSpace = function () {
    return this.replace(/\s+/g, "")
};
String.prototype.startsWith = function (e) {
    return new RegExp("^" + e).test(this)
};
function removeAjaxDataAllSpace(e) {
    var t = ["authCode", "oldAuthCode", "email", "eMailAuthCode", "smsAuthCode", "newAuthCode", "twoStepVerifyCode", "vAuthCode", "eMail", "eMailActivateCode", "smsAuthCode", "newAuthCode", "secVerifyCode", "randomCode", "randomAuthCode"];
    $.each(t, function (t, i) {
        if (e.hasOwnProperty(i) && typeof e[i] == "string") {
            e[i] = e[i].removeAllSpace()
        }
    })
}
function getCversion() {
    var e = navigator.userAgent;
    if (!e) {
        return
    }
    e = e.toLowerCase();
    var t = e.indexOf("cversion=");
    if (t < 0) {
        return
    }
    var i = e.indexOf("_", t);
    if (i < 0) {
        return
    }
    var n = i + 1;
    var r = 5;
    var s = e.substr(n, r);
    return s
}
function wapUploadPic(e, t, i) {
    $.ajax({
        url: localInfo.localHttps + "/ajaxHandler/displayPic?reflushCode=" + Math.random() + "&iswap=1",
        type: "POST",
        data: e,
        dataType: "json",
        processData: false,
        contentType: false,
        beforeSend: function (e) {
            e.setRequestHeader("Page-Token", "undefined" == typeof pageToken ? "" : pageToken)
        },
        success: t,
        error: i
    })
}
$(function () {
    if (/msie\s+(7|8|9)/.test(navigator.userAgent.toLowerCase())) {
        $("#passwdEye").remove()
    }
});
function isApp() {
    return /phoneservice/.test(navigator.userAgent) || /huaweimessager/.test(navigator.userAgent)
}
function toUperCaseStr(e) {
    var t = localInfo.lang || getUrlParm("lang");
    if (!/^en-/.test(t) || !e)return e;
    var i = htmldecode(e);
    var n = i.toUpperCase(i);
    e = e.replace(i, n);
    return e
}
function initStepNavigation(e, t, i) {
    var n = '<div class="stepNav-container">';
    var i = i ? i > 0 ? i : 4 : 4;
    var t = t ? t > 0 && t <= i ? t : 1 : 1;
    var r = 1;
    for (; r < i; r++) {
        n += '<div class="stepNav' + r + '"></div><div class="tepNav-split"></div><div class="stepNav-dot"></div><div class="tepNav-split"></div><div class="stepNav-dot"></div><div class="tepNav-split"></div>'
    }
    n += '<div class="stepNav' + r + '"></div></div>';
    if (e) {
        e.html(xssFilter(n));
        e.find(".stepNav" + t).addClass("stepNav" + t + "-selected")
    }
}
function getAppealChangesLinkDiv(e, t, i) {
    var n = false;
    if (e && e.length > 0) {
        $.each(e, function (e, t) {
            if (t.value) {
                if ($.parseJSON(t.value).type == "2" || $.parseJSON(t.value).type == "6") {
                    n = true
                }
            } else {
                if (t.accountType == "2" || t.accountType == "6") {
                    n = true
                }
            }
        })
    }
    linkStr = '<div class="appealChangeLink_div center" style="' + i + '">';
    var r = rss_new.inputSecAuthCode_cantUsePhone;
    if (!n) {
        r = rss_new.inputSecAuthCode_cantUseEmail
    }
    if (t) {
        r = r + '<a class="representation_link a-EMUI5" href="' + localInfo.representationLink + "&extInfo=" + localInfo.extInfo + '">' + rss_new.account_appeal + "</a></div>"
    } else {
        r = r + '<a target="_blank"  class="representation_link a-EMUI5" href="' + localInfo.representationLink + "&extInfo=" + localInfo.extInfo + '">' + rss_new.account_appeal + "</a></div>"
    }
    linkStr += '<div class="cantReciveTips">' + r + "</div>";
    return linkStr
}
function showInputError(e, t, i) {
    i = i || e.next();
    e.addClass("error-underline");
    i.addClass("underline-error-tips").text(t)
}
function hideInputError(e, t) {
    t = t || e.next();
    e.removeClass("error-underline");
    t.html("")
}
function backToIndex() {
    window.onpopstate = function () {
        location.href = "index.html"
    };
    if (!!(window.history && window.history.replaceState)) {
        history.replaceState({url: "index.html"}, "", "index.html")
    }
}
function valiMobile(e, t) {
    e = $.trim(e);
    if (e.length == 0) {
        return true
    }
    var i = t || $("#input_languageCode input").val() || $("#countryCode").val() || "";
    i = i.replace("+", "00");
    e = e.replace("+", "00");
    if (e.startsWith(i)) {
        e = e.substring(i.length, e.length)
    } else if (e.startsWith("00")) {
        return false
    }
    if (i == "0086" || i == "+86" || i == "") {
        if (e.length < 11) {
            return false
        }
        return phoneRegex.chinesePhone.test(e)
    } else {
        if (i == "001" && e.length != 10) {
            return false
        }
        return phoneRegex.anyPhone.test(e)
    }
}
function getPhoneNumber(e, t) {
    e = $.trim(e);
    if (e.length == 0) {
        return true
    }
    e = e.replace("+", "00");
    var i = t || $("#input_languageCode input").val() || $("#countryCode").val() || "";
    if (!e.startsWith(i)) {
        e = i + e
    }
    return e
}
function valiEmail(e, t) {
    if (!e) {
        return false
    }
    var i = phoneRegex.email;
    var n = new RegExp(i);
    var r;
    if (t) {
        r = e.split(t)
    } else {
        r = [e]
    }
    for (var s = 0; s < r.length; s++) {
        if (r[s].match(n) == null) {
            return false
        }
    }
    return true
}
function isTrustTheBrowser(e, t) {
    var i = '<div class="isTrusBrowser-container"><span id="ajaxStatusDiv" class="hide"></span><span class="isTrusBrowser-content">' + rss_new.trustBrowser_label_content + "</span>" + '<div class="center"><a href="javascript:void(0);" id="reminderNextTime" class="isTrusBrowser-link">' + rss_new.trustBrowser_btn_remainNextTime + "</a></div></div>";
    var n = {
        title: rss_new.trustBrowser_label_DialogTitle,
        html: i,
        btnLeft: {
            text: rss_new.trustBrowser_btn_dontTrust, fn: function () {
                if ($("#ajaxStatusDiv").hasClass("send-ajax")) {
                    return false
                } else {
                    $("#ajaxStatusDiv").addClass("send-ajax")
                }
                e.trustBrowser = 0;
                updateTrustBrowser(e, t, this)
            }
        },
        btnRight: {
            text: rss_new.trustBrowser_btn_trust, fn: function () {
                if ($("#ajaxStatusDiv").hasClass("send-ajax")) {
                    return false
                } else {
                    $("#ajaxStatusDiv").addClass("send-ajax")
                }
                e.trustBrowser = 1;
                updateTrustBrowser(e, t, this)
            }, customClass: "btn-EMUI5"
        },
        cancelFn: function () {
            if ($("#ajaxStatusDiv").hasClass("send-ajax")) {
                return false
            } else {
                $("#ajaxStatusDiv").addClass("send-ajax")
            }
            e.trustBrowser = 2;
            updateTrustBrowser(e, t, this)
        },
        dialogStyle: localInfo.msgDialogStyle,
        beforeAction: function () {
            var i = this;
            $("#reminderNextTime").on("click", function () {
                if ($("#ajaxStatusDiv").hasClass("send-ajax")) {
                    return false
                } else {
                    $("#ajaxStatusDiv").addClass("send-ajax")
                }
                e.trustBrowser = 2;
                updateTrustBrowser(e, t, i)
            });
            $(".global_dialog_confirm_nor[role='confirm']").addClass("customizeBtnStyle")
        }
    };
    $("<div>").Dialog(n).Dialog("show");
    function r(e) {
        $("div").DialogSimple({text: e, btnText: rss_new.box_js_confirm}).show()
    }
}
function updateTrustBrowser(e, t, i) {
    ajaxHandler("updateTrustBrowser", e, function (n) {
        i.hide();
        if (t != undefined) {
            if (e.needVerifyOrChangePhoneParams && e.needVerifyOrChangePhoneParams.needVerifyOrChangePhone) {
                popVerifyOrChangeMobilePhone(e.needVerifyOrChangePhoneParams, t)
            } else {
                t()
            }
        }
    }, function (e) {
    }, false, "JSON")
}
function popAgreeDFDialog(e) {
    if ($(".global_dialog_confirm_content").length > 0) {
        return
    }
    var t = "", i = "", n = "";
    if (localInfo.curAccountSiteID == "1") {
        i = rss_new.agree_DFVersion_title2Login;
        n = rss_new.box_js_cancel;
        t += '<div class="DFVersion-slideDiv"><div class="DFVersion-EMUI6">' + rss_new.agree_DFVersion_Content1 + "</div>" + '<div class="DFVersion-EMUI6"><span class="key_pointer">â€¢  </span>' + localInfo.agree_DFVersion_Content1_info1 + "</div>" + '<div class="DFVersion-EMUI6">' + rss_new.agree_DFVersion_Content2 + "</div>" + '<div class="DFVersion-EMUI6 marginTop8">' + rss_new.agree_DFVersion_Content3 + "</div></div>" + '<div class="DFVersion-EMUI6 DFVersion-marginFix">' + localInfo.agree_DFVersion_Content4 + "</div>"
    }
    $("<div>").Dialog({
        title: i, btnLeft: {
            text: n, fn: function () {
                this.hide()
            }
        }, btnRight: {
            text: rss_new.common_agree, fn: function () {
                var t;
                if (e != undefined) {
                    if (e.opType == "11") {
                        t = {"mobilePhone": e.mobilePhone, "smsAuthCode": e.smsAuthCode, "opType": e.opType}
                    } else {
                        t = {
                            "userAccount": e.userAccount,
                            "password": e.password,
                            "authcode": e.authcode,
                            "opType": e.opType
                        }
                    }
                    agreeDFAgr(t, e.callbackFn);
                    this.hide()
                } else {
                    agreeDFAgr();
                    this.hide()
                }
            }
        }, html: t, dialogStyle: localInfo.msgDialogStyle, beforeAction: function () {
        }
    }).Dialog("show")
}
function getCaptcha(e, t, i) {
    if (localInfo.displayCaptchaType == "0") {
        $("#picAuthCode").addClass("user-input-tr")
    }
    var e = e ? e : "100%";
    var t = t ? t : "0px";
    var n = {
        "captchaType": localInfo.displayCaptchaType,
        "width": e,
        "top": t,
        "lang": localInfo.lang,
        "clientType": "cas",
        "respType": "1"
    };
    if (i) {
        n.showType = i
    }
    ajaxHandler("getCaptcha", n, function (e) {
        var t = e.isSuccess;
        if (t == "1") {
            getCaptchaHtml = e.respContent;
            $("#picAuthCode").html(getCaptchaHtml);
            $("#randomCodeImg").off("error");
            $("#randomCodeImg").bind("error", function () {
                checkRamdomObj.sendErrorLog(2)
            });
            if ($("#randomCode").length > 0) {
                $("#picAuthCode").addClass("input-content");
                if (localInfo.isNewCloudLoginPage == "true") {
                    $.label($("#randomCode"), rss_new.common_js_inputcode)
                } else {
                    $.label($("#randomCode"), rss_new.login_dialog_imgCode)
                }
            }
            if (localInfo.displayCaptchaType == 0) {
                $("#picAuthCode").parent().addClass("user-input-tr")
            }
        } else {
            if (localInfo.isWap) {
                $("#passwd_msg").text(rss_new.uc_error_10000001);
                $("#btnLogin").addClass("disabled")
            } else showLoginError(rss_new.uc_error_10000001, "loginErr");
            $("#btnLogin").addClass("disabled");
            checkRamdomObj.sendErrorLog(1)
        }
    }, function () {
        checkRamdomObj.sendErrorLog(1)
    }, false, "json")
}
function thirdAccountBind(e) {
    thirdAccountLogin(e)
}
function thirdAccountLogin(e) {
    if (isMobile()) {
        var t = $("." + e.className + " img");
        if (t.length == 0) {
            t = $("." + e.className + " a")
        }
        var i = t.attr("toUrl");
        var n = localHttps + i + localInfo.queryString;
        window.top.location.href = n
    } else {
        var t = $("." + e.className + " a");
        var r = localInfo.thirdLoginUrlAddrass;
        var s = t.attr("toUrl");
        var i = r + s + localInfo.queryString;
        if (window != window.top) {
            if (localInfo.bizIfmUrl) {
                i = i + "&bizIfmUrl=" + encodeURIComponent(localInfo.bizIfmUrl)
            }
            window.top.location.href = i
        } else {
            t.attr("href", XSSGuard4URL(i))
        }
    }
}
function getPwdComplexity4EMUI(e) {
    var t = {strong: 0, noSpace: false, Length: false, pwdComplexity: false, isInputError: false};
    var i = /([0-9])+/;
    var n = /([a-zA-Z])+/;
    var r = /([~!@#\$%\^&\*\(\)__\+`\-=\{\}\|\[\]\\;':\",\.\/<>\?])+/;
    if (e.length > 0 && !e.match(/\s/)) {
        t.noSpace = true
    }
    if (e.length >= 8 && e.length <= 32) {
        t.Length = true
    }
    if (e.match(i) && e.match(n) || e.match(i) && e.match(r) || e.match(n) && e.match(r)) {
        t.pwdComplexity = true
    }
    if (e.match(/([^0-9a-zA-Z~!@#\$%\^&\*\(\)__\+`\-=\{\}\|\[\]\\;':\",\.\/<>\?])+/)) {
        t.isInputError = true
    }
    t.strong = chkPwdComplexity4EMUI(e);
    return t
}
function chkPwdComplexity4EMUI(e) {
    var t = /([0-9])+/;
    var i = /([a-zA-Z])+/;
    var n = /([~!@#\$%\^&\*\(\)__\+`\-=\{\}\|\[\]\\;':\",\.\/<>\?])+/;
    if (e.length < 8) {
        return 0
    }
    var r = 0;
    if (e.length >= 8 && e.length <= 32) {
        r = 1
    }
    if (e.match(t)) {
        r = 1
    }
    if (e.match(i)) {
        r = 1
    }
    if (e.match(n)) {
        r = 1
    }
    if (e.match(t) && e.match(i) && (e.length >= 8 && e.length <= 32) || e.match(t) && e.match(n) && (e.length >= 8 && e.length <= 32) || e.match(i) && e.match(n) && (e.length >= 8 && e.length <= 32)) {
        r = 2;
        if (getRepet(e) > 3) {
            r = 3
        }
    }
    return r
}
function pwdStrengthHintDialog() {
    var e = $("#pwd_check_dialog").html();
    if (!e) {
        var t = '<div class="pwd-info-indialog">';
        t += '<div class="normal-tips-EMUI5 pwd-format-des-head normal-tips">' + rss_new.reset_pwd_format_title + "</div>";
        t += '<div id="pwdLength" class="gray-tips-EMUI5 "><img class="pwd-format l" src=""> <span>' + rss_new.reducePwd_format_1 + "</span></div>";
        t += '<div id="pwdChar" class="gray-tips-EMUI5 "> <img class="pwd-format l" src=""> <span>' + rss_new.reducePwd_format_2 + "</span></div>";
        t += '<div id="pwdNumber" class="gray-tips-EMUI5"> <img class="pwd-format l" src=""> <span>' + rss_new.reducePwd_format_3 + "</span></div>";
        t += "</div>";
        t += '<div class="pwd-info" style="margin-top: 16px;">';
        t += '<div class="normal-tips">' + rss_new.pwd_strength + '<span id="pwdComplexFlag"></span></div>';
        t += '<div class="line8-EMUI5">';
        t += '<div class="gray-tips">';
        t += '<div class="pwd-complex">';
        t += '<div id="pwdStong" class="pwd-stro"></div>';
        t += "</div>";
        t += "</div>";
        t += "</div>";
        t += '<div id="pwd-tips" class="normal-tips-EMUI5 color66">' + rss_new.uc_change_pwd_safe_tip + "</div>";
        t += "</div>";
        showMsgSuccess({
            obj: $("#pwd_check_dialog"),
            msg: t,
            leftPix: "55px",
            rightPix: "0px",
            bottom: "38px",
            autoHide: false,
            contentType: "html"
        });
        $("#pwdLength > img.pwd-format").attr("src", XSSGuard4URL(localInfo.formatNo));
        $("#pwdChar > img.pwd-format").attr("src", XSSGuard4URL(localInfo.formatNo));
        $("#pwdNumber > img.pwd-format").attr("src", XSSGuard4URL(localInfo.formatNo))
    }
}
function onPwdKeyUp4EMUI(e, t, i, n, r, s, a, o) {
    if (localInfo.isNeedPwdStrengthDialog == "true") {
        pwdStrengthHintDialog()
    }
    var l = getPwdComplexity4EMUI(e.value);
    var d = $("#pwdStong");
    t = t ? t : $("#msg_password");
    i = i ? i : $("#pwdDiv");
    n = n ? n : "";
    r = r ? r : "input-error-EMUI5";
    a = a ? a : $("#resetPwdBtn");
    if (l.noSpace && l.Length && l.pwdComplexity) {
        isWeakPassword(e.value, function (e) {
            if (e.isSuccess == 1) {
                if (o) {
                    d.addClass("pwd-strong").removeClass("pwd-low").removeClass("pwd-middle")
                } else {
                    d.addClass("pwd-strong-div").removeClass("pwd-low-div").removeClass("pwd-middle-div")
                }
                $("#pwdComplexFlag").text(rss_new.common_strong);
                t.removeClass(n).html("");
                i.removeClass(r)
            } else if (e.errorCode == "10000801") {
                if (o) {
                    d.addClass("pwd-low").removeClass("pwd-middle").removeClass("pwd-strong")
                } else {
                    d.addClass("pwd-low-div").removeClass("pwd-middle-div").removeClass("pwd-strong-div")
                }
                $("#pwdComplexFlag").text(rss_new.common_weak);
                t.addClass(n).text(rss_new.uc_error_70008001);
                i.addClass(r)
            }
        })
    } else {
        if (o) {
            d.removeClass("pwd-middle").removeClass("pwd-low").removeClass("pwd-strong")
        } else {
            d.removeClass("pwd-middle-div").removeClass("pwd-low-div").removeClass("pwd-strong-div")
        }
        $("#pwdComplexFlag").html("");
        t.removeClass(n).html("");
        i.removeClass(r)
    }
    c($("#pwdLength"), l.noSpace);
    c($("#pwdChar"), l.Length);
    c($("#pwdNumber"), l.pwdComplexity);
    function c(e, t) {
        if (t) {
            e.find("img").attr("src", XSSGuard4URL(localInfo.formatOk));
            e.removeClass("gay-tips-EMUI5").addClass("success-tips-EMUI5")
        } else {
            e.find("img").attr("src", XSSGuard4URL(localInfo.formatNo));
            e.removeClass("success-tips-EMUI5").addClass("gay-tips-EMUI5")
        }
    }

    if (s && l.strong * 1 < 2) {
        a.addClass("disabled")
    } else {
        a.removeClass("disabled")
    }
}
function registerPwdformatValidator(e) {
    if (e) {
        validator.register("pwdformat", function (t, i) {
            if (i.allowEmpty && (t == "" || t == null)) {
                return true
            }
            var n = e.val();
            usernameReverse = n.split("").reverse().join("");
            if (t.toLowerCase() == n.toLowerCase() || t.toLowerCase() == usernameReverse.toLowerCase()) {
                return false
            } else {
                return true
            }
        })
    }
    validator.register("hasSpace", function (e, t) {
        if (!getPwdComplexity4EMUI(e).noSpace) {
            return false
        } else {
            return true
        }
    });
    validator.register("pwdComplexity", function (e, t) {
        if (t.allowEmpty && (e == "" || e == null)) {
            return true
        }
        if (!getPwdComplexity4EMUI(e).pwdComplexity) {
            return false
        } else {
            return true
        }
    });
    validator.register("errorInput", function (e, t) {
        if (t.allowEmpty && (e == "" || e == null)) {
            return true
        }
        if (getPwdComplexity4EMUI(e).isInputError) {
            return false
        } else {
            return true
        }
    })
}
function registerPwdformatValidator4Wap(e) {
    if (e) {
        validator.register("pwdformat", function (t, i) {
            var n = e.val();
            usernameReverse = n.split("").reverse().join("");
            if (t.toLowerCase() == n.toLowerCase() || t.toLowerCase() == usernameReverse.toLowerCase()) {
                return false
            } else {
                return true
            }
        })
    }
    validator.register("hasSpace", function (e, t) {
        if (!getPwdComplexity4EMUI(e).noSpace) {
            return false
        } else {
            return true
        }
    });
    validator.register("pwdComplexity", function (e, t) {
        if (!getPwdComplexity4EMUI(e).pwdComplexity) {
            return false
        } else {
            return true
        }
    });
    validator.register("errorInput", function (e, t) {
        if (getPwdComplexity4EMUI(e).isInputError) {
            return false
        } else {
            return true
        }
    })
}
function adjustPhoneCountryCodeStyle() {
    var e = $("#phoneInputDiv-box").width() * .33;
    $("#input_languageCode").find("span.select-text").css("max-width", e + "px");
    $("#input_languageCode").find("span.select-text").css("white-space", "normal");
    $("#input_languageCode").find("span.select-text").css("word-wrap", "break-word");
    $("#input_languageCode").find("span.select-text").css("word-break", "break-all");
    $("#input_languageCode").find("span.select-text").css("display", "inline-block");
    $("#input_languageCode").find("span.select-text").css("vertical-align", "middle");
    $("#input_languageCode").find(".select-ico").css("display", "inline-block");
    $("#input_languageCode").find(".select-ico").css("vertical-align", "middle");
    $("#input_languageCode").find(".select-ico").removeClass("r");
    if (parseInt($("#input_languageCode").find("span.select-text").width()) > 80 && $("#input_languageCode").find("span.select-text").text().length > 7) {
        $("#input_languageCode").find("span.select-text").text($("#input_languageCode").find("span.select-text").text().substring(0, 7) + "...")
    }
    var t = $("#input_languageCode")[0].offsetHeight;
    var i = 20;
    $("#phoneInputDiv").find(".input-div").css("height", $("#input_languageCode").height() + i + "px");
    $("#phoneInputDiv").find(".input-div").css("line-height", $("#input_languageCode").height() + i + "px")
}
function wapWindowResize() {
    var e = document.documentElement.clientHeight;
    $(window).resize(function () {
        if (localInfo.fromApp == "true") {
            var t = document.documentElement.clientHeight;
            if (t > e) {
                e = t;
                setTimeout(function () {
                    $(".footBtn-div").css("position", "absolute");
                    $("#blank").height(10);
                    window.scrollTo(0, 0)
                }, 50)
            } else {
                e = t;
                setTimeout(function () {
                    $(".footBtn-div").css("position", "fixed");
                    $("#blank").height(330);
                    window.scrollTo(0, 45)
                }, 300)
            }
        }
    })
}
function showCountDown(e, t, i) {
    t.text(e);
    if (e == 0) {
        window.location.href = i
    } else {
        e--;
        setTimeout(showCountDown, 1e3, e, t, i)
    }
}
function areaMap(e) {
    var t = e[0];
    var i = e[1];
    var n = [];
    if (t.indexOf("å†…è’™å¤è‡ªæ²»") >= 0) {
        t = "å†…è’™å¤"
    } else if (t.indexOf("å¹¿è¥¿å£®æ—è‡ªæ²»") >= 0) {
        t = "å¹¿è¥¿"
    } else if (t.indexOf("è¥¿è—è‡ªæ²»") >= 0) {
        t = "è¥¿è—"
    } else if (t.indexOf("å®å¤å›žæ—è‡ªæ²»") >= 0) {
        t = "å®å¤"
    } else if (t.indexOf("æ–°ç–†ç»´å¾å°”è‡ªæ²»") >= 0) {
        t = "æ–°ç–†"
    } else if (t.indexOf("é¦™æ¸¯ç‰¹åˆ«è¡Œæ”¿") >= 0) {
        t = "é¦™æ¸¯"
    } else if (t.indexOf("æ¾³é—¨ç‰¹åˆ«è¡Œæ”¿") >= 0) {
        t = "æ¾³é—¨"
    }
    if (i.indexOf("å…´å®‰ç›Ÿ") >= 0) {
        i = "å…´å®‰"
    } else if (i.indexOf("é”¡æž—éƒ­å‹’ç›Ÿ") >= 0) {
        i = "é”¡æž—éƒ­å‹’"
    } else if (i.indexOf("é˜¿æ‹‰å–„ç›Ÿ") >= 0) {
        i = "é˜¿æ‹‰å–„"
    } else if (i.indexOf("å»¶è¾¹æœé²œæ—è‡ªæ²»å·ž") >= 0) {
        i = "å»¶è¾¹"
    } else if (i.indexOf("æ©æ–½åœŸå®¶æ—è‹—æ—è‡ªæ²»å·ž") >= 0) {
        i = "æ©æ–½"
    } else if (i.indexOf("æ¹˜è¥¿åœŸå®¶æ—è‹—æ—è‡ªæ²»å·ž") >= 0) {
        i = "æ¹˜è¥¿"
    } else if (i.indexOf("é˜¿åè—æ—ç¾Œæ—è‡ªæ²»å·ž") >= 0) {
        i = "é˜¿å"
    } else if (i.indexOf("ç”˜å­œè—æ—è‡ªæ²»å·ž") >= 0) {
        i = "ç”˜å­œ"
    } else if (i.indexOf("å‡‰å±±å½æ—è‡ªæ²»å·ž") >= 0) {
        i = "å‡‰å±±"
    } else if (i.indexOf("é»”è¥¿å—å¸ƒä¾æ—è‹—æ—è‡ªæ²»å·ž") >= 0) {
        i = "é»”è¥¿å—"
    } else if (i.indexOf("é»”ä¸œå—è‹—æ—ä¾—æ—è‡ªæ²»å·ž") >= 0) {
        i = "é»”ä¸œå—"
    } else if (i.indexOf("é»”å—å¸ƒä¾æ—è‹—æ—è‡ªæ²»å·ž") >= 0) {
        i = "é»”å—"
    } else if (i.indexOf("æ¥šé›„å½æ—è‡ªæ²»å·ž") >= 0) {
        i = "æ¥šé›„"
    } else if (i.indexOf("çº¢æ²³å“ˆå°¼æ—å½æ—è‡ªæ²»å·ž") >= 0) {
        i = "çº¢æ²³"
    } else if (i.indexOf("æ–‡å±±å£®æ—è‹—æ—è‡ªæ²»å·ž") >= 0) {
        i = "æ–‡å±±"
    } else if (i.indexOf("è¥¿åŒç‰ˆçº³å‚£æ—è‡ªæ²»å·ž") >= 0) {
        i = "è¥¿åŒç‰ˆçº³"
    } else if (i.indexOf("å¤§ç†ç™½æ—è‡ªæ²»å·ž") >= 0) {
        i = "å¤§ç†"
    } else if (i.indexOf("å¾·å®å‚£æ—æ™¯é¢‡æ—è‡ªæ²»å·ž") >= 0) {
        i = "å¾·å®"
    } else if (i.indexOf("æ€’æ±Ÿå‚ˆåƒ³æ—è‡ªæ²»å·ž") >= 0) {
        i = "æ€’æ±Ÿ"
    } else if (i.indexOf("è¿ªåº†è—æ—è‡ªæ²»å·ž") >= 0) {
        i = "è¿ªåº†"
    } else if (i.indexOf("ä¸´å¤å›žæ—è‡ªæ²»å·ž") >= 0) {
        i = "ä¸´å¤"
    } else if (i.indexOf("ç”˜å—è—æ—è‡ªæ²»å·ž") >= 0) {
        i = "ç”˜å—"
    } else if (i.indexOf("æµ·åŒ—è—æ—è‡ªæ²»å·ž") >= 0) {
        i = "æµ·åŒ—"
    } else if (i.indexOf("é»„å—è—æ—è‡ªæ²»å·ž") >= 0) {
        i = "é»„å—"
    } else if (i.indexOf("æµ·å—è—æ—è‡ªæ²»å·ž") >= 0) {
        i = "æµ·å—"
    } else if (i.indexOf("æžœæ´›è—æ—è‡ªæ²»å·ž") >= 0) {
        i = "æžœæ´›"
    } else if (i.indexOf("çŽ‰æ ‘è—æ—è‡ªæ²»å·ž") >= 0) {
        i = "çŽ‰æ ‘"
    } else if (i.indexOf("æµ·è¥¿è’™å¤æ—è—æ—è‡ªæ²»å·ž") >= 0) {
        i = "æµ·è¥¿"
    } else if (i.indexOf("æ˜Œå‰å›žæ—è‡ªæ²»å·ž") >= 0) {
        i = "æ˜Œå‰"
    } else if (i.indexOf("åšå°”å¡”æ‹‰è’™å¤è‡ªæ²»å·ž") >= 0) {
        i = "åšå°”å¡”æ‹‰"
    } else if (i.indexOf("å·´éŸ³éƒ­æ¥žè’™å¤è‡ªæ²»å·ž") >= 0) {
        i = "å·´éŸ³éƒ­æ¥ž"
    } else if (i.indexOf("å…‹å­œå‹’è‹æŸ¯å°”å…‹å­œè‡ªæ²»å·ž") >= 0) {
        i = "å…‹å­œå‹’è‹"
    } else if (i.indexOf("ä¼ŠçŠå“ˆè¨å…‹è‡ªæ²»å·ž") >= 0) {
        i = "ä¼ŠçŠ"
    } else if (i.indexOf("å¤§å…´å®‰å²­åœ°åŒº") >= 0) {
        i = "å¤§å…´å®‰å²­"
    } else if (i.indexOf("æ˜Œéƒ½åœ°åŒº") >= 0) {
        i = "æ˜Œéƒ½"
    } else if (i.indexOf("å±±å—åœ°åŒº") >= 0) {
        i = "å±±å—"
    } else if (i.indexOf("é‚£æ›²åœ°åŒº") >= 0) {
        i = "é‚£æ›²"
    } else if (i.indexOf("é˜¿é‡Œåœ°åŒº") >= 0) {
        i = "é˜¿é‡Œ"
    } else if (i.indexOf("æž—èŠåœ°åŒº") >= 0) {
        i = "æž—èŠ"
    } else if (i.indexOf("åé²ç•ªåœ°åŒº") >= 0) {
        i = "åé²ç•ª"
    } else if (i.indexOf("å“ˆå¯†åœ°åŒº") >= 0) {
        i = "å“ˆå¯†"
    } else if (i.indexOf("é˜¿å…‹è‹åœ°åŒº") >= 0) {
        i = "é˜¿å…‹è‹"
    } else if (i.indexOf("å–€ä»€åœ°åŒº") >= 0) {
        i = "å–€ä»€"
    } else if (i.indexOf("å’Œç”°åœ°åŒº") >= 0) {
        i = "å’Œç”°"
    } else if (i.indexOf("å¡”åŸŽåœ°åŒº") >= 0) {
        i = "å¡”åŸŽ"
    } else if (i.indexOf("é˜¿å‹’æ³°åœ°åŒº") >= 0) {
        i = "é˜¿å‹’æ³°"
    }
    n.push(t);
    n.push(i);
    return n
}
function initCityItems(e) {
    var t = [];
    $.each(provinces, function (i, n) {
        if (e == n.id) {
            var r = n.citys;
            $.each(r, function (e, i) {
                var n = i[e];
                if (localInfo.lang != "zh-cn") {
                    n = getPingyin(n)
                }
                var r = {value: e, label: n, other: i[e]};
                t.push(r)
            })
        }
    });
    return t
}
function showOldInfoRepeat(e) {
    var t = true;
    var i = $("input." + e + "Value");
    $.each(i, function (n, r) {
        $.each(i, function (i, s) {
            if (s === r || n > i)return;
            if (r.value === s.value && r.value != "") {
                if (e == "IMEIInput") {
                    showInputError($(s).parent(), rss_new.appeal_error_repeat)
                } else {
                    showError($(s).closest("." + e + "Item").find(".errorNode"), rss_new.appeal_error_repeat);
                    var a = $("#" + e).offset().top;
                    $(document).scrollTop(a - 30)
                }
                $("#next").addClass("disabled");
                t = false
            }
        })
    });
    return t
}
function setHeight(e, t) {
    var i = e.outerHeight();
    if (t) {
        i = i + t
    }
    $("#blank").height(i)
}
function openCompleteInfoDialog(e, t) {
    $("<div></div>").Dialog({
        title: rss_new.uc_common_hint, btnLeft: {
            text: rss_new.box_js_cancel, fn: function () {
                this.hide()
            }
        }, btnRight: {
            text: rss_new.box_js_confirm, fn: function () {
                gotoUrl(t)
            }
        }, html: e, beforeAction: function () {
        }
    }).Dialog("show")
}
function phoneValidator(e) {
    var t = e.$phone ? e.$phone : "";
    var i = e.showErrorFn ? e.showErrorFn : "";
    var n = e.successFn ? e.successFn : "";
    var r = e.reInputFn ? e.reInputFn : "";
    if (!t) {
        return
    }
    t.validator("bind", {
        type: ["require", "phoneNumber"],
        trim: false,
        validOnChange: true,
        errorFunction: function (e, t) {
            switch (t.type) {
                case"require":
                    i(t.type);
                    break;
                case"phoneNumber":
                    i(t.type);
                    break
            }
        },
        successFunction: function (e, t) {
            if (n) {
                n()
            }
        },
        reInputFunction: function () {
            if (r) {
                r()
            }
        }
    })
}
function emailValidator(e) {
    var t = e.$email ? e.$email : "";
    var i = e.showErrorFn ? e.showErrorFn : "";
    var n = e.successFn ? e.successFn : "";
    var r = e.reInputFn ? e.reInputFn : "";
    if (!t) {
        return
    }
    t.validator("bind", {
        type: ["require", "length", "email"],
        trim: true,
        validOnChange: true,
        min: 4,
        max: 50,
        errorFunction: function (e, t) {
            switch (t.type) {
                case"require":
                    i(rss_new.login_js_accountlength);
                    break;
                case"length":
                    i(rss_new.login_js_accountlength);
                    break;
                case"email":
                    i(rss_new.register_js_emailfomaterror);
                    break
            }
        },
        successFunction: function (e, t) {
            if (n) {
                n()
            }
        },
        reInputFunction: function () {
            if (r) {
                r()
            }
        }
    })
}
function accountValidator(e) {
    var t = e.$account ? e.$account : "";
    var i = e.showErrorFn ? e.showErrorFn : "";
    var n = e.successFn ? e.successFn : "";
    var r = e.reInputFn ? e.reInputFn : "";
    if (!t) {
        return
    }
    t.validator("bind", {
        type: ["require", "length"],
        trim: true,
        validOnChange: true,
        min: 4,
        max: 50,
        errorFunction: function (e, t) {
            switch (t.type) {
                case"require":
                    i(rss_new.login_js_inputaccount);
                    break;
                case"length":
                    i(rss_new.login_js_accountlength);
                    break
            }
        },
        successFunction: function (e, t) {
            if (n) {
                n()
            }
        },
        reInputFunction: function () {
            if (r) {
                r()
            }
        }
    });
    t.keyup(function () {
        var e = $(this);
        if (e.val() != "" && /^[\s\S]*[\u4e00-\u9fa5]+[\s\S]*$/.test(e.val())) {
            e.val("")
        }
    })
}
function getWebUrlHttps() {
    return localHttps + "/ajaxHandler/"
}
(function () {
    var e = function (e) {
        var t = e[0].contentEditable === "true" ? e.html() : e.val();
        if (!e.nofirst) {
            e.nofirst = true;
            e.data("lastValue", t)
        }
        if (t !== e.data("lastValue")) {
            e.trigger("textchange", [e.data("lastValue")]);
            e.data("lastValue", t)
        }
    };
    jQuery.event.special.textchange = {
        setup: function (t, i, n) {
            var r = $(this);
            setInterval(function () {
                e(r)
            }, 100)
        }, teardown: function (e) {
        }
    }
})();
function getdefaultCountryByCurrentSiteID() {
    var e = "";
    switch (currentSiteID) {
        case"9":
            e = currentSiteID + "-" + "us";
            break;
        case"5":
            e = currentSiteID + "-" + "hk";
            break;
        case"8":
            e = currentSiteID + "-" + "ru";
            break;
        case"7":
            e = currentSiteID + "-" + "de";
            break;
        case"1":
            e = currentSiteID + "-" + "cn";
            break;
        case"3":
            e = currentSiteID + "-" + "ir";
            break
    }
    return e
}
(function () {
    if (typeof window.JSON !== "object") {
        var JSON = {};
        window.JSON = JSON
    } else {
        return
    }
    var rx_one = /^[\],:{}\s]*$/;
    var rx_two = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;
    var rx_three = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;
    var rx_four = /(?:^|:|,)(?:\s*\[)+/g;
    var rx_escapable = /[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;
    var rx_dangerous = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;

    function f(e) {
        return e < 10 ? "0" + e : e
    }

    function this_value() {
        return this.valueOf()
    }

    if (typeof Date.prototype.toJSON !== "function") {
        Date.prototype.toJSON = function () {
            return isFinite(this.valueOf()) ? this.getUTCFullYear() + "-" + f(this.getUTCMonth() + 1) + "-" + f(this.getUTCDate()) + "T" + f(this.getUTCHours()) + ":" + f(this.getUTCMinutes()) + ":" + f(this.getUTCSeconds()) + "Z" : null
        };
        Boolean.prototype.toJSON = this_value;
        Number.prototype.toJSON = this_value;
        String.prototype.toJSON = this_value
    }
    var gap;
    var indent;
    var meta;
    var rep;

    function quote(e) {
        rx_escapable.lastIndex = 0;
        return rx_escapable.test(e) ? '"' + e.replace(rx_escapable, function (e) {
                var t = meta[e];
                return typeof t === "string" ? t : "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4)
            }) + '"' : '"' + e + '"'
    }

    function str(e, t) {
        var i;
        var n;
        var r;
        var s;
        var a = gap;
        var o;
        var l = t[e];
        if (l && typeof l === "object" && typeof l.toJSON === "function") {
            l = l.toJSON(e)
        }
        if (typeof rep === "function") {
            l = rep.call(t, e, l)
        }
        switch (typeof l) {
            case"string":
                return quote(l);
            case"number":
                return isFinite(l) ? String(l) : "null";
            case"boolean":
            case"null":
                return String(l);
            case"object":
                if (!l) {
                    return "null"
                }
                gap += indent;
                o = [];
                if (Object.prototype.toString.apply(l) === "[object Array]") {
                    s = l.length;
                    for (i = 0; i < s; i += 1) {
                        o[i] = str(i, l) || "null"
                    }
                    r = o.length === 0 ? "[]" : gap ? "[\n" + gap + o.join(",\n" + gap) + "\n" + a + "]" : "[" + o.join(",") + "]";
                    gap = a;
                    return r
                }
                if (rep && typeof rep === "object") {
                    s = rep.length;
                    for (i = 0; i < s; i += 1) {
                        if (typeof rep[i] === "string") {
                            n = rep[i];
                            r = str(n, l);
                            if (r) {
                                o.push(quote(n) + (gap ? ": " : ":") + r)
                            }
                        }
                    }
                } else {
                    for (n in l) {
                        if (Object.prototype.hasOwnProperty.call(l, n)) {
                            r = str(n, l);
                            if (r) {
                                o.push(quote(n) + (gap ? ": " : ":") + r)
                            }
                        }
                    }
                }
                r = o.length === 0 ? "{}" : gap ? "{\n" + gap + o.join(",\n" + gap) + "\n" + a + "}" : "{" + o.join(",") + "}";
                gap = a;
                return r
        }
    }

    if (typeof JSON.stringify !== "function") {
        meta = {"\b": "\\b", "\t": "\\t", "\n": "\\n", "\f": "\\f", "\r": "\\r", '"': '\\"', "\\": "\\\\"};
        JSON.stringify = function (e, t, i) {
            var n;
            gap = "";
            indent = "";
            if (typeof i === "number") {
                for (n = 0; n < i; n += 1) {
                    indent += " "
                }
            } else {
                if (typeof i === "string") {
                    indent = i
                }
            }
            rep = t;
            if (t && typeof t !== "function" && (typeof t !== "object" || typeof t.length !== "number")) {
                throw new Error("JSON.stringify")
            }
            return str("", {"": e})
        }
    }
    if (typeof JSON.parse !== "function") {
        JSON.parse = function (text, reviver) {
            var j;

            function walk(e, t) {
                var i;
                var n;
                var r = e[t];
                if (r && typeof r === "object") {
                    for (i in r) {
                        if (Object.prototype.hasOwnProperty.call(r, i)) {
                            n = walk(r, i);
                            if (n !== undefined) {
                                r[i] = n
                            } else {
                                delete r[i]
                            }
                        }
                    }
                }
                return reviver.call(e, t, r)
            }

            text = String(text);
            rx_dangerous.lastIndex = 0;
            if (rx_dangerous.test(text)) {
                text = text.replace(rx_dangerous, function (e) {
                    return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4)
                })
            }
            if (rx_one.test(text.replace(rx_two, "@").replace(rx_three, "]").replace(rx_four, ""))) {
                j = eval("(" + text + ")");
                return typeof reviver === "function" ? walk({"": j}, "") : j
            }
            throw new SyntaxError("JSON.parse")
        }
    }
})();
function registerAgreement(e) {
    var t = "";
    if (localInfo.currentCountrySiteID) {
        t = localInfo.currentCountrySiteID
    } else {
        t = localInfo.currentSiteID
    }
    var i = false;
    if ("5" == t || "7" == t) {
        i = true
    }
    var n = localInfo.agreementContents;
    var r = "";
    r += "<div class='agreementInfo1 agreementInfo5'>";
    if (i) {
        r += "<div class='reg-tip hwid-Notice'>" + rss_new.uc_common_country_or_regions_colon + rss.now_register_normal.format($("#selectedCountry").text()) + "</div>"
    }
    for (var s = 0; s < n.length; s++) {
        var a = n[s];
        if (i) {
            r += "<div class='reg-tip hwid-Notice marginTop16'>"
        } else {
            r += "<div class='reg-tip'>"
        }
        if (a.agrID == "10") {
            if (a.defaultAgreeOrNot) {
                r += "<div class='check-tip clearFix'>";
                r += "<label class='regCheck reg-check l reg-select' datavalue='true'></label>";
                r += a.agrBrief;
                r += "</div>"
            } else {
                r += "<div class='check-tip clearFix'>";
                r += "<label class='regCheck reg-check l' datavalue='false'></label>";
                r += a.agrBrief;
                r += "</div>"
            }
        } else {
            r += a.agrBrief
        }
        r += "</div>"
    }
    r += "</div>";
    var o = rss_new.service_terms;
    var l = rss_new.uc_common_no_agree;
    var d = rss_new.common_agree;
    if (t == "1") {
        o = rss_new.agree_DFVersion_title2Register;
        l = rss_new.box_js_cancel
    }
    if (i) {
        l = rss_new.box_js_cancel;
        d = rss_new.common_go_on;
        o = rss_new.service_terms_conditions
    }
    $("<div>").Dialog({
        title: o, btnLeft: {
            text: l, fn: function () {
                this.hide()
            }
        }, btnRight: {
            text: d, fn: function () {
                if ($("#btnSubmit").hasClass("send-ajax")) {
                    return
                }
                e(this)
            }
        }, html: r, beforeAction: function () {
            $(".regCheck").off();
            if (localInfo.adMarketAgreeStatus) {
                $(this).addClass("reg-select");
                $(this).attr("datavalue", "true");
                $("#adMarketChecked").prop("checked", true)
            } else {
                $(this).removeClass("reg-select");
                $(this).attr("datavalue", "false");
                $("#adMarketChecked").prop("checked", false)
            }
            $(".regCheck").on("click", function () {
                if ($(this).hasClass("reg-select")) {
                    $(this).removeClass("reg-select");
                    $(this).attr("datavalue", "false");
                    $("#adMarketChecked").prop("checked", false)
                } else {
                    $(this).addClass("reg-select");
                    $(this).attr("datavalue", "true");
                    $("#adMarketChecked").prop("checked", true)
                }
            })
        }
    }).Dialog("show")
}
function apkOOBEgetAndInputAuthCodeFn(e) {
    if (localInfo.oobe == "true" && localInfo.clientNonce) {
        setTimeout(function () {
            androidCallBack.oobe.smsAuthCode = null;
            getSMSAuthCodeFromOobe(0, e);
            var t = '{"timeout":"60"}';
            getSMSAuthCodeForJS(localInfo.clientNonce, t)
        }, 1)
    }
}
function getSMSAuthCodeFromOobe(e, t) {
    if (androidCallBack.oobe.smsAuthCode) {
        var i = $.parseJSON(androidCallBack.oobe.smsAuthCode);
        androidCallBack.oobe.smsAuthCode = null;
        if (i) {
            var n = i.sms_auth_code;
            if (n) {
                t.val(n)
            }
        }
        return
    }
    if (e > 60) {
        return
    } else {
        e = e + 1;
        setTimeout(getSMSAuthCodeFromOobe, 1e3, e, t)
    }
}
function regFootLinkUpdate(e, t, i, n) {
    if (e == 1) {
        $("#foot_EULA").attr("href", XSSGuard4URL(n)).text(rss_new.hwid_user_agr_beijing);
        $("#foot_privacy").attr("href", XSSGuard4URL(i)).text(rss_new.foot_label_accPrivacyStatement);
        $("#faqPart").html(localInfo.faqHtml);
        $("#copyrightPart").text(rss_new.common_copyright_1)
    } else if (e == 3 || e == 5 && t) {
        $("#foot_privacy").attr("href", XSSGuard4URL(i)).text(rss_new.user_privacy_agreement_title);
        $("#foot_EULA").attr("href", XSSGuard4URL(n)).text(rss_new.hwid_user_agr_common);
        $("#faqPart").html("");
        $("#copyrightPart").text("")
    } else if (e == 5 && !t || e == 7) {
        $("#foot_EULA").attr("href", XSSGuard4URL(n)).text(rss_new.hwid_user_agr_aspiegel);
        $("#foot_privacy").attr("href", XSSGuard4URL(i)).text(rss_new.foot_label_accPrivacyStatement);
        $("#faqPart").html("");
        $("#copyrightPart").text("")
    }
}
function regKeyBoardEvent(e, t, i) {
    var n = $("input");
    if (i.length > 0) {
        n = i
    }
    n.keyup(function (i) {
        if (i.which == e) {
            t()
        }
    })
}
function isRiskfree(e) {
    if (e == 0 || e == undefined) {
        return true
    }
    return false
}
function setBindPhoneEmailNextText(e) {
    if (e == 1 || e == 0) {
        return rss_new.modifyUserInfo_to_bind
    } else {
        return rss_new.uc_common_set
    }
}
function handleCrossSite(e) {
    var t = e.redirectSiteUrl;
    if (t.indexOf("oauth2") > 0) {
        if (isMobile()) {
            t = t.substr(0, t.indexOf("oauth2")) + "oauth2/mobile/resetpwdbyid.jsp"
        } else {
            t = t.substr(0, t.indexOf("oauth2")) + "oauth2/portal/forgetbyid.jsp"
        }
        t = t + localInfo.queryString
    } else {
        t = t + localInfo.requestURIQuery
    }
    if (e.extInfo) {
        if (t.indexOf("?") > 0) {
            if (t.indexOf("extInfo") > 0) {
                var i = new RegExp("extInfo=[^&]*", "i");
                if (i.test(t)) {
                    t = t.replace(i, "extInfo=" + e.extInfo)
                }
            } else {
                t = t + "&extInfo=" + e.extInfo
            }
        } else {
            t = t + "?extInfo=" + e.extInfo
        }
    }
    if (isMobile() && localInfo.clientNonce) {
        t = t + "&clientNonce=" + localInfo.clientNonce
    }
    openGlobalCrossSiteDialog(t)
}
function openGlobalCrossSiteDialog(e) {
    var t = rss_new.global_cross_page_redirect_forget;
    $("<div>").Dialog({
        title: rss_new.common_hint, btnLeft: {
            text: rss_new.common_cancel, fn: function () {
                this.hide();
                ramdonCodeImgObj.resetRandomCode()
            }
        }, btnRight: {
            text: rss_new.common_ok, fn: function () {
                gotoUrl(e)
            }
        }, html: t, beforeAction: function () {
        }
    }).Dialog("show")
}
function adBanner(e, t, i, n, r) {
    if (!e) {
        return
    }
    var s;
    if (e instanceof jQuery) {
        s = e
    } else {
        s = $("#" + e)
    }
    s.css("display", "block");
    s.css("width", "100%");
    s.css("min-height", t + "px");
    s.css("line-height", t + "px");
    s.css("font-size", i + "px");
    s.css("background-color", n);
    s.text(r);
    s.css("text-align", "center")
}
function isArray(e) {
    return Object.prototype.toString.call(e) === "[object Array]"
}
function getCountryCallingCode(e, t) {
    var i = {"lang": localInfo.lang};
    if (t) {
        i.siteIDs = localInfo.curSiteSupportSMSLoginSites
    } else {
        i.siteIDs = localInfo.curAccountSiteID
    }
    casAjaxObj.getCountryCallingCode(i, e, function (e) {
    })
}
function rebuildCountryRegions(e, t) {
    var i = [];
    localInfo.isOrderByLetter = false;
    for (var n = 0; n < 26; n++) {
        var r = String.fromCharCode(65 + n);
        if (e[r.toLowerCase()]) {
            if ("zh-cn" == localInfo.lang || "en-us" == localInfo.lang) {
                var s = {};
                s[r] = e[r.toLowerCase()];
                i.push(s);
                localInfo.isOrderByLetter = true
            }
            $.each(e[r.toLowerCase()], function (e, i) {
                if (!isMobile()) {
                    var n = i.label;
                    i.label = n.substring(n.indexOf("+")) + "  " + n.substring(0, n.indexOf("+"))
                }
                t.push(i)
            })
        }
    }
    return i
}
function convPlusOfPhoneAccount(e) {
    if (e) {
        var t = e.replace(/^\s+|\s+$/g, "");
        var i = t.charAt(0);
        if (i == "+") {
            return "00" + t.substring(1)
        }
        return t
    }
    return e
}
$(document).on("focus", "input[type=text]", function () {
    var e = $(this);
    var t = e.offset().top;
    $(window).on("resize", i);
    function i() {
        window.scrollTo(0, t);
        $(window).off("resize", i)
    }
});
function removePhoneCountryCode(e, t) {
    var i = e;
    if (typeof e == "string" && typeof t == "string") {
        var n = new RegExp("^" + t);
        if (e.match(n)) {
            i = e.substring(e.match(n)[0].length)
        }
    }
    return i
}
if (!Array.prototype.indexOf) Array.prototype.indexOf = function (e, t, i) {
    "use strict";
    return function n(r, s) {
        if (this === null || this === undefined)throw TypeError("Array.prototype.indexOf called on null or undefined");
        var a = e(this), o = a.length >>> 0, l = i(s | 0, o);
        if (l < 0) l = t(0, o + l); else if (l >= o)return -1;
        if (r === void 0) {
            for (; l !== o; ++l)if (a[l] === void 0 && l in a)return l
        } else if (r !== r) {
            for (; l !== o; ++l)if (a[l] !== a[l])return l
        } else for (; l !== o; ++l)if (a[l] === r)return l;
        return -1
    }
}(Object, Math.max, Math.min);
function isJSONStr(e, t) {
    if (typeof e == "string") {
        try {
            if (typeof localInfo == "object" && typeof t == "string") {
                localInfo[t] = JSON.parse(e)
            } else {
                JSON.parse(e)
            }
            return true
        } catch (e) {
            return false
        }
    } else {
        return false
    }
}
function monitorSessionFn() {
    window.addEventListener("pageshow", function (e) {
        if (e.persisted) {
            location.reload()
        }
    })
}
$(function () {
    $(".pre-div,.next-div").bind("touchstart", function () {
        if ($(this).find("a").hasClass("disabled"))return;
        $(".next-press-bg", $(this)).remove();
        var e = countLength($(this).text(), $(this).css("font-size")) + 8 * 2 + 20;
        $(this).append("<div class='next-press-bg' style=''></div>");
        $(".next-press-bg", $(this)).width(e)
    });
    $(".pre-div,.next-div").bind("touchend", function () {
        if ($(this).find("a").hasClass("disabled"))return;
        $(".next-press-bg", $(this)).remove()
    })
});


;
(function () {
    /**
     * ç™¾åº¦ç»Ÿè®¡jsä»£ç ï¼ˆæš‚ç”¨äºŽè‡ªåŠ©ç”³è¯‰å’Œå¿˜è®°å¯†ç ï¼‰
     * ç™¾åº¦ç»Ÿè®¡ä¼šä¸ºæ¯ä¸ªç›‘æŽ§çš„ç«™ç‚¹åˆ†é…å”¯ä¸€çš„id,å¦‚ä¸‹valueå€¼,å¦‚æžœç«™ç‚¹åˆ é™¤äº†é‡æ–°æ·»åŠ ,idä¼šå˜,éœ€è¦åœ¨æ­¤é…ç½®æ–‡ä»¶è¿›è¡Œç›¸åº”ä¿®æ”¹
     */

        // ç›‘æŽ§çš„ç«™ç‚¹ /1|2|3/
    var watchSites = 1;
    // ç›‘æŽ§urlä¸Šå…³é”®å‚æ•°/xxxx|xxxx|xxxx/
    var watchUrls = /\/resetPwd\/|\/appealSelf\/|\/consumerHelper\/|helpCenterFaq\.html/;
    if (typeof currentSiteID == "undefined")
        return;
    if (!(watchUrls.test(location.pathname) && watchSites == currentSiteID)) {
        return;
    }
    var keys = {
        "hwid.vmall.com": "edb08798f6310f7010176bf8668210d5",
        "hwid1.vmall.com": "ad7c111dd23c2ce53a6a3716f4dab0de",
        "id.cloud.huawei.com": "06fa95cb59df674fd51e0dd6574576ce",
        "id1.cloud.huawei.com": "54809cd74e7441a81abed3956e3894bd",
        "forgot.cloud.huawei.com": "27c92cb830e0d987ddac063cce3331e1",
        "forgot1.cloud.huawei.com": "0592deb1aac320cdf9b84dd141b66d2c"
    };

    window._hmt = window._hmt || [];
    var hm = document.createElement("script");
    hm.src = "https://hm.baidu.com/hm.js?" + keys[location.host];
    var s = document.getElementsByTagName("script")[0];
    s.parentNode.insertBefore(hm, s);

})();